package com.knight.controller;

import java.net.URLDecoder;
import java.util.List;

import com.jfinal.core.Controller;
import com.knight.common.constant.Constant;
import com.knight.model.Menu;
import com.knight.service.MenuService;

public class AboutCompanyController extends Controller {

	private static MenuService menuService = MenuService.getInstance();

	private static List<Menu> list = menuService.findMenuByparentId(Constant.MenuTypes.LEVEL_TWO_MENU,
			Constant.ParentMenuId.ABOUT_ID);

	/**
	 * 公司介绍
	 * 
	 * @throws Exception
	 */
	public void companyProfile() throws Exception {
		String name = URLDecoder.decode(getPara(), "UTF-8");
		setAttr("menus", list);
		setAttr("secondMenuName", name);
		render("aboutCompany/about.html");
	}

	/**
	 * 企业文化
	 * 
	 * @throws Exception
	 */
	public void companyCulture() throws Exception {
		String name = URLDecoder.decode(getPara(), "UTF-8");
		setAttr("menus", list);
		setAttr("secondMenuName", name);
		render("aboutCompany/culture.html");
	}
}
